<template>
  <el-table
      :data="tableData"
      height="690px"
      v-loading="loading"
      style="width: 100%"
      :header-cell-style="{background:'#ffd04b',color:'#606266'}">
    <el-table-column
        align="center"
        prop="id"
        label="编号">
    </el-table-column>
    <el-table-column
        align="center"
        prop="specs"
        label="规格">
    </el-table-column>
    <el-table-column
        align="center"
        prop="status"
        label="状态">
    </el-table-column>
    <el-table-column
        align="center"
        prop="hourPrice"
        label="价格(元/h)">
    </el-table-column>
  </el-table>
</template>

<script>
import axios from "axios";

export default {
  name: "roomMsg",
  created() {
    axios.get('http://120.24.48.65:8282/rooms/list').then(response=>{
      this.tableData = response.data
      console.log(response.data)
      if (response.data){
          setTimeout(() => {
            //代码
            this.loading = false
          }, 500);
      }
    })
  },
  data() {
    return {
      tableData: [

      ],
      loading:true
    }
  }
}
</script>
<style >

</style>


